package controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class IncluirPacienteServlet extends HttpServlet{

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		
		
		//pega os parametros do formulario
		
		String nome = req.getParameter("nome");
		String idade = req.getParameter("idade");
		String cpf = req.getParameter("cpf");
		String rg = req.getParameter("rg");
		String email = req.getParameter("email");
		String endereco = req.getParameter("endereco");
		String telefone = req.getParameter("telefone");
		String cep = req.getParameter("cep");
		
		//resposta do servlet 
		
		resp.getWriter().println("<html>");
		resp.getWriter().println("<head>");
		resp.getWriter().println("<title> isso e a resposta do servidor </title>");
		resp.getWriter().println("</head>");
		
		resp.getWriter().println("<body>");
		
		resp.getWriter().println("seu nome e: " + nome);
		resp.getWriter().println("sua idade e: " + idade);
		resp.getWriter().println("seu cpf e: " + cpf);
		resp.getWriter().println("seu rg e: " + rg);
		resp.getWriter().println("seu endereco e: " + endereco);
		resp.getWriter().println("seu telefone e: " + telefone);
		resp.getWriter().println("seu cep e: " + cep);
		
		
		
		resp.getWriter().println("</body>");
									
		resp.getWriter().println("</html>");
		
	}
	
}
